package com.gang.mars.redisson.Thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Apple16ThreadPool {

    public static void main(String[] args) {

        new Apple16ThreadPool().test0();
    }

    private void test0(){

        ExecutorService executorService = Executors.newFixedThreadPool(10);

        executorService.execute(new CustomizeThread());
        executorService.execute(new CustomizeThread());
        executorService.execute(new CustomizeThread());

        executorService.shutdownNow();
    }

    class CustomizeThread implements Runnable{

        @Override
        public void run() {

            for (int i = 0; i < 1; i++) {
                System.out.println(Thread.currentThread().getName() + " " + i);
            }
        }
    }
}
